<?php
abstract class TdAbstractRenderer {
  protected function __construct() {
  }

  final public static function getInstance($calledclass="") {
    static $aoInstance = array();

    if (function_exists('get_called_class')) {
      $calledClassName = get_called_class();
    }
    else {
      $calledClassName = $calledclass;
    }

    if (!isset ($aoInstance[$calledClassName])) {
      $aoInstance[$calledClassName] = new $calledClassName();
    }

    return $aoInstance[$calledClassName];
  }

  final private function __clone() {
  }

  abstract function doCheck();
  abstract function doInit();
  abstract function doValidate();
}
?>
